<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>循环遍历数组</title>
</head>
<body>

<h1>循环遍历Array数组，（使用方法同List一样）</h1>
<div th:each="user,userStat:${userArray}">

    <span th:text="${userStat.count}"></span>
    <span th:text="${userStat.index}"></span>
    <span th:text="${user.id}"></span>
    <span th:text="${user.name}"></span>
    <span th:text="${user.phone}"></span>
    <span th:text="${user.address}"></span>
</div>

<br>
<br>
<br>

<div th:each="user:${userArray}">

    <span th:text="${userStat.count}"></span>
    <span th:text="${userStat.index}"></span>
    <span th:text="${user.id}"></span>
    <span th:text="${user.name}"></span>
    <span th:text="${user.phone}"></span>
    <span th:text="${user.address}"></span>
</div>

</body>
</html>